import React, { Component } from 'react';
import './UserCard.less';
import { Link } from 'react-router-dom';

export default class UserCard extends Component {
    render() {
        return (
            <div className='user-card'>
                <Link to='/userinfo' className='avatar-container'>
                    <img className='avatar-image' src={this.props.info.avatarUrl} alt="" />
                    <img className='edit-image' src={require('../../../images/myself_icon8.png')} alt="" />
                </Link>
                <div className='card'>
                    <div className='name'>{this.props.info.realName}</div>
                    <div className='userID'>{this.props.info.personNumber}</div>
                    <div className='info-list'>
                        <div className='info-item'>
                            <div className='info-money'>{this.props.info.countMoney}</div>
                            <div className='info-text'>账号余额(元)</div>
                        </div>
                        <div className='info-item'>
                            <div className='info-money'>{this.props.info.yesterdayEarnings}</div>
                            <div className='info-text'>昨日收益(元)</div>
                        </div>
                        <div className='info-item'>
                            <div className='info-money'>{this.props.info.moonMoney}</div>
                            <div className='info-text'>本月收益(元)</div>
                        </div>
                    </div>
                </div>
            </div>
        );
    }
}